package com.bl.weilan.dao.repository;
import com.bl.weilan.dao.model.NewsEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by liangweikang on 19/6/24.
 */
public interface NewsRepository extends JpaRepository<NewsEntity, String> {

    Page<NewsEntity> findByTypeOrderByWeightDesc(String type, Pageable pageable);

    Page<NewsEntity> findByOrderByWeightDesc(Pageable pageable);
    Page<NewsEntity> findByTitleLike(String title,Pageable pageable);
}
